    <div id="toolbar-box">
      <div class="t">
        <div class="t">
          <div class="t"></div>
        </div>
      </div>
      <div class="m">
        <div id="toolbar" class="toolbar">
            <table class="toolbar"><tbody><tr>
                    <td id="toolbar-save" class="button"><a class="toolbar" onClick="javascript: submitbutton('save'); return false;" href="javascript:void(0);"> <span title="Save" class="icon-32-save"> </span> Save </a> </td>
                    <td id="toolbar-cancel" class="button"><a class="toolbar" onClick="javascript: submitbutton('cancel'); return false;" href="javascript:void(0);"> <span title="Cancel" class="icon-32-cancel"> </span> Cancel </a> </td>
            </tr></tbody></table>
        </div>
        <div class="header icon-48-user">Tạo mới sản phẩm</div>
        <div class="clr"></div>
      </div>
      <div class="b">
        <div class="b">
          <div class="b"></div>
        </div>
      </div>
    </div>
    <div class="clr"></div>
<div id="submenu-box">
  <div class="t">
    <div class="t">
      <div class="t"></div>
    </div>
  </div>
  <div class="m">
    <ul id="submenu">
      <li> <a class="active" href="<?php echo $this->Html->url(array('controller'=>'products', 'action'=>'index')); ?>">Sản phẩm</a> </li>
      <li> <a href="<?php echo $this->Html->url(array('controller'=>'product_categories')); ?>">Danh mục sản phẩm</a> </li>
    </ul>
    <div class="clr"></div>
  </div>
  <div class="b">
    <div class="b">
      <div class="b"></div>
    </div>
  </div>
</div>
    <div id="element-box">
      <div class="t">
        <div class="t">
          <div class="t"></div>
        </div>
      </div>
      <div class="m">
    <script language="javascript" type="text/javascript">
            function submitbutton(pressbutton) {
                    var form = document.adminForm;
                    if (pressbutton == 'cancel') {
                            submitform( pressbutton );
                            return;
                    }
                    if(pressbutton == 'save'){
                        if($('#ProductTitle').val() == ''){
                            h3l_show_alert($('#ProductTitle'), 'Vui lòng nhập tên sản phẩm');
                            $('#ProductTitle').focus();
                            return;
                        }
                        if($('#ProductCatId').val() == 0){
                            h3l_show_alert($('#ProductCatId'), 'Vui lòng chọn 1 danh mục');
                            $('#ProductCatId').focus();
                            return;
                        }
                        var re = /^.*[0-9]+$/i;
                        if(!re.test($('#ProductPrice').val())){
                            $('#ProductPrice').focus().val('');
                            h3l_show_alert($('#ProductPrice'), 'Vui lòng nhập giá sản phẩm');
                            return;
                        }

                        var re = /^.*\.[gif|jpg|jpeg|jpe|png]+$/i;
                        if(!re.test($('#ProductImages').val())) {
                            h3l_show_alert($('#ProductImages'), 'chọn 1 hình ảnh kích thước lớn có phần mở rộng là (gif|jpg|jpeg|jpe|png)!');
                            $('#ProductImages').focus();
                            return;
                        }
                        if(!re.test($('#ProductThumbnail').val())) {
                            h3l_show_alert($('#ProductThumbnail'), 'chọn 1 hình ảnh kích thước nhỏ (thumbnail) có phần mở rộng là (gif|jpg|jpeg|jpe|png)!');
                            $('#ProductThumbnail').focus();
                            return;
                        }
                    }
                    submitform( pressbutton );
            }
    </script>
    <?php echo $this->Form->create('Product', array('type'=>'file', 'style'=> 'clear: both;', 'name'=>'adminForm', 'id'=>'adminForm')); ?>
      <div class="col">
        <fieldset class="adminform">
        <legend>User Details</legend>
        <table cellspacing="1" class="admintable">
          <tbody>
            <tr>
              <td width="150" class="key"><label for="title">Tên sản phẩm </label>
              </td>
              <td>
                    <?php echo $this->Form->input('title', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="product_code">Mã sản phẩm</label>
              </td>
              <td>
                    <?php echo $this->Form->input('product_code', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="warrant_time">Bảo hành</label>
              </td>
              <td>
                    <?php echo $this->Form->input('warrant_time', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="gift_content">Quà tặng kèm theo</label>
              </td>
              <td>
                    <?php echo $this->Form->input('gift_content', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr
            <tr>
              <td width="150" class="key"><label for="view_times">Số lần xem</label>
              </td>
              <td>
                    <?php echo $this->Form->input('view_times', array('class'=>'inputbox', 'size'=> 20, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="brand_name">Tên nhãn hiệu</label>
              </td>
              <td>
                    <?php echo $this->Form->input('brand_name', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="producer">Nơi sản xuất</label>
              </td>
              <td>
                    <?php echo $this->Form->input('producer', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="product_size">Size</label>
              </td>
              <td>
                    <?php echo $this->Form->input('product_size', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="published"> Published </label>
              </td>
              <td>
                    <?php echo $this->Form->radio('published', array('1'=> 'Yes', 0=>'No'), array('legend'=>false,'default'=> '1')); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="parent_id">Danh mục</label>
              </td>
              <td>
                    <?php
                    echo $this->Category->build_list('cat_id');
                    ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="hot_product"> Hot product  </label>
              </td>
              <td>
                    <?php echo $this->Form->radio('hot_product', array('1'=> 'Yes', 0=>'No'), array('legend'=>false,'default'=> '1')); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="is_promotion">Sản phẩm khuyến mãi</label>
              </td>
              <td>
                    <?php echo $this->Form->radio('is_promotion', array('1'=> 'Yes', 0=>'No'), array('legend'=>false,'default'=> '0')); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="status">tình trạng</label>
              </td>
              <td>
                    <?php echo $this->Form->select('status',$status_list, array('empty'=> false,'secure'=>true)); ?>
              </td>
            </tr>

            <tr>
              <td width="150" class="key"><label for="price">Giá </label>
              </td>
              <td>
                    <?php echo $this->Form->input('price', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="price_promotion"> Giá khuyến mãi </label>
              </td>
              <td>
                    <?php echo $this->Form->input('price_promotion', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="images">Thumbnail large (300x350)</label>
              </td>
              <td>
                    <?php echo $this->Form->input('images', array('type'=>'file', 'class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="thumbnail">Thumbnail small (130x160)</label>
              </td>
              <td>
                    <?php echo $this->Form->input('thumbnail', array('type'=>'file', 'class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
            <tr>
              <td class="key"><label for="buy_description">Hướng dãn mua hàng </label>
              </td>
              <td>
                    <?php echo $this->Editor->loadEditor('data[Product][buy_description]'); ?>
              </td>
            </tr>
            <tr>
              <td class="key"><label for="content">Content </label>
              </td>
              <td>
                    <?php echo $this->Editor->loadEditor('data[Product][description]'); ?>
              </td>
            </tr>
          </tbody>
        </table>
        </fieldset>
      </div>
      <div class="clr"></div>
      <?php echo $this->Form->input('id', array('type'=>'hidden')); ?>
      <input type="hidden" name="task" value="" />
    </form>
        <div class="clr"></div>
      </div>
      <div class="b">
        <div class="b">
          <div class="b"></div>
        </div>
      </div>
    </div>
